Optimal. Leaf size=97 \[ -\frac {a}{4 c^2 \left (1+a^2 x^2\right )}-\frac {\text {ArcTan}(a x)}{c^2 x}-\frac {a^2 x \text {ArcTan}(a x)}{2 c^2 \left (1+a^2 x^2\right )}-\frac {3 a \text {ArcTan}(a x)^2}{4 c^2}+\frac {a \log (x)}{c^2}-\frac {a \log \left (1+a^2 x^2\right )}{2 c^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.12, antiderivative size = 97, normalized size of antiderivative = 1.00, number of steps
used = 10, number of rules used = 10, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {5086, 5038,
4946, 272, 36, 29, 31, 5004, 5012, 267} \begin {gather*} -\frac {a^2 x \text {ArcTan}(a x)}{2 c^2 \left (a^2 x^2+1\right )}-\frac {a}{4 c^2 \left (a^2 x^2+1\right )}-\frac {a \log \left (a^2 x^2+1\right )}{2 c^2}-\frac {3 a \text {ArcTan}(a x)^2}{4 c^2}-\frac {\text {ArcTan}(a x)}{c^2 x}+\frac {a \log (x)}{c^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 29
Rule 31
Rule 36
Rule 267
Rule 272
Rule 4946
Rule 5004
Rule 5012
Rule 5038
Rule 5086
Rubi steps
\begin {align*} \int \frac {\tan ^{-1}(a x)}{x^2 \left (c+a^2 c x^2\right )^2} \, dx &=-\left (a^2 \int \frac {\tan ^{-1}(a x)}{\left (c+a^2 c x^2\right )^2} \, dx\right )+\frac {\int \frac {\tan ^{-1}(a x)}{x^2 \left (c+a^2 c x^2\right )} \, dx}{c}\\ &=-\frac {a^2 x \tan ^{-1}(a x)}{2 c^2 \left (1+a^2 x^2\right )}-\frac {a \tan ^{-1}(a x)^2}{4 c^2}+\frac {1}{2} a^3 \int \frac {x}{\left (c+a^2 c x^2\right )^2} \, dx+\frac {\int \frac {\tan ^{-1}(a x)}{x^2} \, dx}{c^2}-\frac {a^2 \int \frac {\tan ^{-1}(a x)}{c+a^2 c x^2} \, dx}{c}\\ &=-\frac {a}{4 c^2 \left (1+a^2 x^2\right )}-\frac {\tan ^{-1}(a x)}{c^2 x}-\frac {a^2 x \tan ^{-1}(a x)}{2 c^2 \left (1+a^2 x^2\right )}-\frac {3 a \tan ^{-1}(a x)^2}{4 c^2}+\frac {a \int \frac {1}{x \left (1+a^2 x^2\right )} \, dx}{c^2}\\ &=-\frac {a}{4 c^2 \left (1+a^2 x^2\right )}-\frac {\tan ^{-1}(a x)}{c^2 x}-\frac {a^2 x \tan ^{-1}(a x)}{2 c^2 \left (1+a^2 x^2\right )}-\frac {3 a \tan ^{-1}(a x)^2}{4 c^2}+\frac {a \text {Subst}\left (\int \frac {1}{x \left (1+a^2 x\right )} \, dx,x,x^2\right )}{2 c^2}\\ &=-\frac {a}{4 c^2 \left (1+a^2 x^2\right )}-\frac {\tan ^{-1}(a x)}{c^2 x}-\frac {a^2 x \tan ^{-1}(a x)}{2 c^2 \left (1+a^2 x^2\right )}-\frac {3 a \tan ^{-1}(a x)^2}{4 c^2}+\frac {a \text {Subst}\left (\int \frac {1}{x} \, dx,x,x^2\right )}{2 c^2}-\frac {a^3 \text {Subst}\left (\int \frac {1}{1+a^2 x} \, dx,x,x^2\right )}{2 c^2}\\ &=-\frac {a}{4 c^2 \left (1+a^2 x^2\right )}-\frac {\tan ^{-1}(a x)}{c^2 x}-\frac {a^2 x \tan ^{-1}(a x)}{2 c^2 \left (1+a^2 x^2\right )}-\frac {3 a \tan ^{-1}(a x)^2}{4 c^2}+\frac {a \log (x)}{c^2}-\frac {a \log \left (1+a^2 x^2\right )}{2 c^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.04, size = 94, normalized size = 0.97 \begin {gather*} -\frac {a}{4 c^2 \left (1+a^2 x^2\right )}-\frac {\left (2+3 a^2 x^2\right ) \text {ArcTan}(a x)}{2 c^2 x \left (1+a^2 x^2\right )}-\frac {3 a \text {ArcTan}(a x)^2}{4 c^2}+\frac {a \log (x)}{c^2}-\frac {a \log \left (1+a^2 x^2\right )}{2 c^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.21, size = 95, normalized size = 0.98
method | result | size |
derivativedivides | \(a \left (-\frac {a x \arctan \left (a x \right )}{2 c^{2} \left (a^{2} x^{2}+1\right )}-\frac {3 \arctan \left (a x \right )^{2}}{2 c^{2}}-\frac {\arctan \left (a x \right )}{c^{2} a x}-\frac {-\frac {3 \arctan \left (a x \right )^{2}}{2}+\frac {1}{2 a^{2} x^{2}+2}+\ln \left (a^{2} x^{2}+1\right )-2 \ln \left (a x \right )}{2 c^{2}}\right )\) | \(95\) |
default | \(a \left (-\frac {a x \arctan \left (a x \right )}{2 c^{2} \left (a^{2} x^{2}+1\right )}-\frac {3 \arctan \left (a x \right )^{2}}{2 c^{2}}-\frac {\arctan \left (a x \right )}{c^{2} a x}-\frac {-\frac {3 \arctan \left (a x \right )^{2}}{2}+\frac {1}{2 a^{2} x^{2}+2}+\ln \left (a^{2} x^{2}+1\right )-2 \ln \left (a x \right )}{2 c^{2}}\right )\) | \(95\) |
risch | \(\frac {3 a \ln \left (i a x +1\right )^{2}}{16 c^{2}}-\frac {\left (3 a^{3} x^{3} \ln \left (-i a x +1\right )+3 a x \ln \left (-i a x +1\right )-6 i a^{2} x^{2}-4 i\right ) \ln \left (i a x +1\right )}{8 c^{2} x \left (a^{2} x^{2}+1\right )}-\frac {-3 a^{3} x^{3} \ln \left (-i a x +1\right )^{2}+8 \ln \left (3 a^{2} x^{2}+3\right ) a^{3} x^{3}-16 \ln \left (x \right ) a^{3} x^{3}+12 i a^{2} x^{2} \ln \left (-i a x +1\right )-3 a \ln \left (-i a x +1\right )^{2} x +8 \ln \left (3 a^{2} x^{2}+3\right ) a x -16 a x \ln \left (x \right )+8 i \ln \left (-i a x +1\right )+4 a x}{16 \left (a x +i\right ) x \,c^{2} \left (a x -i\right )}\) | \(224\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.48, size = 119, normalized size = 1.23 \begin {gather*} -\frac {1}{2} \, {\left (\frac {3 \, a^{2} x^{2} + 2}{a^{2} c^{2} x^{3} + c^{2} x} + \frac {3 \, a \arctan \left (a x\right )}{c^{2}}\right )} \arctan \left (a x\right ) + \frac {{\left (3 \, {\left (a^{2} x^{2} + 1\right )} \arctan \left (a x\right )^{2} - 2 \, {\left (a^{2} x^{2} + 1\right )} \log \left (a^{2} x^{2} + 1\right ) + 4 \, {\left (a^{2} x^{2} + 1\right )} \log \left (x\right ) - 1\right )} a}{4 \, {\left (a^{2} c^{2} x^{2} + c^{2}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 7.15, size = 97, normalized size = 1.00 \begin {gather*} -\frac {3 \, {\left (a^{3} x^{3} + a x\right )} \arctan \left (a x\right )^{2} + a x + 2 \, {\left (3 \, a^{2} x^{2} + 2\right )} \arctan \left (a x\right ) + 2 \, {\left (a^{3} x^{3} + a x\right )} \log \left (a^{2} x^{2} + 1\right ) - 4 \, {\left (a^{3} x^{3} + a x\right )} \log \left (x\right )}{4 \, {\left (a^{2} c^{2} x^{3} + c^{2} x\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 274 vs.
\(2 (88) = 176\).
time = 0.84, size = 274, normalized size = 2.82 \begin {gather*} \begin {cases} \frac {4 a^{3} x^{3} \log {\left (x \right )}}{4 a^{2} c^{2} x^{3} + 4 c^{2} x} - \frac {2 a^{3} x^{3} \log {\left (x^{2} + \frac {1}{a^{2}} \right )}}{4 a^{2} c^{2} x^{3} + 4 c^{2} x} - \frac {3 a^{3} x^{3} \operatorname {atan}^{2}{\left (a x \right )}}{4 a^{2} c^{2} x^{3} + 4 c^{2} x} - \frac {6 a^{2} x^{2} \operatorname {atan}{\left (a x \right )}}{4 a^{2} c^{2} x^{3} + 4 c^{2} x} + \frac {4 a x \log {\left (x \right )}}{4 a^{2} c^{2} x^{3} + 4 c^{2} x} - \frac {2 a x \log {\left (x^{2} + \frac {1}{a^{2}} \right )}}{4 a^{2} c^{2} x^{3} + 4 c^{2} x} - \frac {3 a x \operatorname {atan}^{2}{\left (a x \right )}}{4 a^{2} c^{2} x^{3} + 4 c^{2} x} - \frac {a x}{4 a^{2} c^{2} x^{3} + 4 c^{2} x} - \frac {4 \operatorname {atan}{\left (a x \right )}}{4 a^{2} c^{2} x^{3} + 4 c^{2} x} & \text {for}\: a \neq 0 \\0 & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.48, size = 91, normalized size = 0.94 \begin {gather*} \frac {a\,\ln \left (x\right )}{c^2}-\frac {a\,\ln \left (a^2\,x^2+1\right )}{2\,c^2}-\frac {\mathrm {atan}\left (a\,x\right )\,\left (\frac {1}{a^2\,c^2}+\frac {3\,x^2}{2\,c^2}\right )}{\frac {x}{a^2}+x^3}-\frac {a}{2\,\left (2\,a^2\,c^2\,x^2+2\,c^2\right )}-\frac {3\,a\,{\mathrm {atan}\left (a\,x\right )}^2}{4\,c^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________